package com.create404.suishoupai.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.create404.suishoupai.entity.PhotoRecord;
import com.create404.suishoupai.mapper.PhotoRecordMapper;
import com.create404.suishoupai.service.IPhotoRecordService;
import com.create404.suishoupai.vo.PhotoRecordVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Service
public class PhotoRecordServiceImpl extends ServiceImpl<PhotoRecordMapper, PhotoRecord> implements IPhotoRecordService {
    @Override
    public List<PhotoRecordVO> getPhotoRecordList() {
        return this.baseMapper.getPhotoRecordList();
    }

    @Override
    public List<PhotoRecordVO> getPhotoRecordListType1() {
        return this.baseMapper.getPhotoRecordListType1();
    }
    @Override
    public List<PhotoRecordVO> getPhotoRecordListType2() {
        return this.baseMapper.getPhotoRecordListType2();
    }


    @Override
    public PhotoRecord getLatestOne() {
        return this.baseMapper.getLatestOne();
    }

    @Override
    public PhotoRecordVO queryById(int id){
        return this.baseMapper.queryById(id);
    }

    @Autowired
    PhotoRecordMapper photoRecordMapper;

    @Override
    public IPage<PhotoRecordVO> getMyPhotoRecords(Page<?> page, String employeeId) {
        return photoRecordMapper.getMyPhotoRecords(page,employeeId);
    }
}
